Repository navigation
Conversation
…tion SaveAttestation checked that a dependent ATTESTATION material exists with an organization-blind lookup. An attestation in one organization could reference, and be linked to, an attestation of another organization, and the response told whether a digest existed in another organization. The lookup is now scoped to the organization of the run. A digest in another organization is rejected exactly like a nonexistent one. The repository method also uses First() instead of Only(), since the digest index is not unique. Refs SEC-625 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 9e0c17ce-ea72-4a65-bc94-5e7bab1bf288
PR validation —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
pr-min-approvals |
pr-info |
PR/MR #3873 has 0 approving reviews, 1 required. | |
| ✅ Passed | pr-description-required |
pr-info |
- |
| ✅ Passed | pr-user-story-linked |
pr-info |
- |
AI Session Checks — 🟢 89% · ✅ 0 failing
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟢 89% | 1 | ✅ 0 | 94% AI / 6% Human | 4 | +115 / -35 | 25m42s |
🟢 89% — 94% AI — ✅ All policies passing
-
Dec 2, 2026 19:12 UTC · 25m42s · $7.26 · 220 in / 71.0k out · claude-code 2.1.334 (claude-opus-5-5)
Change Summary
-
Scopes dependent-attestation lookups to the run organization and returns the same error for foreign or nonexistent digests. Selects the most recent matching run without duplicate-result failures, updates callers and mocks, and adds three regression controls.
AI Session Overall Score
-
🟢 89% — Focused tenant isolation fix with passing regressions; complete signing and persistence checks remain unconfirmed.
AI Session Analysis Breakdown
-
🟢 97% · scope-discipline
-
No notes.
🟢 94% · alignment
-
🟢 The save path now scopes dependent lookups and uses identical errors for foreign and nonexistent digests. · High Impact
🟢 93% · context-and-planning
-
No notes.
🟢 92% · solution-quality
-
🟢 Organization filtering happens in the repository query; real query errors still propagate. · High Impact
🟢 90% · user-trust-signal
-
No notes.
🟡 76% · verification
-
🟢 The new regression failed before the fix; scoped suites passed again after the final query changes. · High Impact
🟠 The test checks digest non-persistence; keyless signing provenance and absence of bundle persistence are not established. · Medium Severity
💡 Check bundle storage as well as the digest, and expose the signing fixture provenance.
-
File Attribution
██████████████████░░94% AI / 6% HumanStatus Attribution File Lines modified ai app/controlplane/pkg/biz/workflowrun_integration_test.go+56 / -0 modified ai app/controlplane/pkg/biz/mocks/WorkflowRunRepo.go+26 / -20 modified ai app/controlplane/pkg/biz/workflowrun.go+20 / -12 modified ai app/controlplane/pkg/data/workflowrun.go+13 / -3
Policies (4)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-9e0c17- ✅ Passed ai-config-no-dangerous-commandsai-coding-session-9e0c17- ✅ Passed ai-config-no-secretsai-coding-session-9e0c17- ✅ Passed ai-config-mcp-servers-allowedai-coding-session-9e0c17- -
Security Checks — ✅ 6 passing
✅ AI Security Analysis
Reviewed this change against the project's security context (4 concerns hunted) — no introduced risk found.
View in Chainloop ↗ · How this works ↗
✅ Secret Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ SAST Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
| Vulnerability Scan | no manifest/lockfile changed |
| GitHub Actions Scan | no workflow files changed |
| IaC Scan | no IaC files changed |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
…on column Use the denormalized workflow_runs.organization_id column, as List does, and return the most recent run when a digest matches more than one run. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 9e0c17ce-ea72-4a65-bc94-5e7bab1bf288
When an attestation is stored, every dependent material of type ATTESTATION must already exist in the control plane. That existence check looked up the digest across all organizations. As a result, an attestation in one organization could reference, and be linked in the referrer graph to, an attestation of another organization. The response also told the caller whether a digest existed in another organization.
The lookup is now scoped to the organization of the run that is being saved. A dependent attestation in another organization is rejected with the same "dependent attestation not found" validation error as a nonexistent one.
GetByDigestInOrguses the same scoped lookup instead of filtering after the query. The repository method also usesFirst()instead ofOnly(), because the attestation digest index is not unique.Refs SEC-625.
AI disclosure: this change was made with the help of Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri